<!DOCTYPE html>
<html xmlns:th="www.thymeleaf.org">
	<head>
		<meta charset="utf-8">
		<meta name="description" content="大学生就业实训,品质就业,职业规划,IT行业人才基地" />
		<title>蜗牛书城(woniuxy.com)-正品低价、品质保障、配送及时、轻松购物！</title>

		<!-- 引入Bootstrap核心样式文件 -->
		<link th:href="@{/bootstrap-3.4.1/css/bootstrap.min.css}" rel="stylesheet">
		<!-- 引入jQuery核心js文件 -->
		<script th:src="@{/javascript/jQuery-1.12.4.js}"></script>
		<!-- 引入BootStrap核心js文件 -->
		<script th:src="@{/bootstrap-3.4.1/js/bootstrap.min.js}"></script>


		<link rel="shortcut icon" th:href="@{/favicon.ico}" type="image/x-icon" />
		<link th:href="@{/css/common.css}" rel="stylesheet" />
		<link th:href="@{/css/top.css}" rel="stylesheet" />
		<link th:href="@{/css/foot.css}" rel="stylesheet" />

		<link th:href="@{/css/cart.css}" rel="stylesheet" />
		
		<script th:src="@{/javascript/cart.js}"></script>

	</head>

	<body>
		<!--  最顶部的导航栏 -->
		<div th:replace="~{common::top}"></div>
		<!--  =================== head =============================== -->
		<div class="head">
			<div class="container">
				<!-- ============= logo ============= -->
				<div class="logo fl">
					<h1>
						<a class="hot-word">蜗牛学苑</a>
					</h1>
				</div>
				<!-- ============= 搜索框部份 ============= -->
				<div class="search fl ml100">
					<div class="up">
						<div class="search-box fl mr18">
							<input class="fl" type="text" value="请输入搜索关键字" />
							<span class="photo">&#xe663;</span>
							<span class="search-icon fl">&#xe660;</span>
						</div>

						<div class="cart fl">
							<span class="iconfont">&#xe622;</span>
							<a href="/cart/showCart">我的购物车</a>
							<i class="num">0</i>
						</div>
					</div>

					<div class="navitems">
						<ol>
							<li><a class="red-and-weight" href="#">秒杀</a></li>
							<li><a class="red-and-weight" href="#">优惠券</a></li>
							<li><a href="#">程序设计</a></li>
							<li><a href="#">数据库</a></li>
							<li><a href="#">网络与数据通信</a></li>
							<li><a href="#">科普读物</a></li>
							<li><a href="#">建筑学</a></li>
						</ol>
					</div>

				</div>
			</div>
		</div>

		<!-- ==================== 购物车 ==================== -->
		<div class="container no-padding book-detail-bg">
		</div>

		<div class="index mt50">
			<div class="container no-padding">
				<span class="cart-name">我的购物车</span>
			</div>
		</div>

		<div class="container no-padding">
			<form action="/order/toOrder" method="post" id="cartForm">
			<table class="table mt10">
				<tr>
					<td>
						<div class="checkbox">
							<label>
								<input class="all" type="checkbox"> 全选
							</label>
						</div>
					</td>
					<td>
						<div class="checkbox">
							书籍封面
						</div>
					</td>
					<td>
						<div class="checkbox">
							书籍名称
						</div>
					</td>
					<td>
						<div class="checkbox">
							单价
						</div>
					</td>
					<td>
						<div class="checkbox">
							数量
						</div>
					</td>
					<td>
						<div class="checkbox">
							小计
						</div>
					</td>
					<td>
						<div class="checkbox">
							操作
						</div>
					</td>
				</tr>

				<tr th:each="cartVo: ${cartList}">
					<td>
						<input class="goods" type="checkbox" th:value="${cartVo.bookId}" name="bookId">
						<input type="text" hidden="hidden" name="cartId" th:value="${cartVo.cartId}">
					</td>
					<td>
						<img th:src="@{|http://192.168.146.10:8099${cartVo.bookImg}|}" />
					</td>
					<td>
						[[${cartVo.bookName}]]
					</td>
					<td class="price">
						[[${cartVo.bookPrice}]]
					</td>
					<td>
						<div class="input-group">
							<span class="input-group-addon glyphicon glyphicon-minus"></span>
							<input type="text" class="form-control buy-count" maxlength="3" th:value="${cartVo.buyCount}" name="buyCount" id="buyCount">
							<span class="input-group-addon glyphicon glyphicon-plus"></span>
						</div>
						<input type="text" hidden="hidden" name="subTotal" th:value="${cartVo.bookPrice * cartVo.buyCount}" id="subTotal">
					</td>
					<td class="total-price" th:text="${cartVo.bookPrice * cartVo.buyCount}">
					</td>
					
					<td>
						<a class="btn btn-danger remove">删除</a>
					</td>
				</tr>

				

				<tr id="last-tr">
					<td colspan="7" class="no-padding">

						<a href="#">继续购物</a>
						|
						已选择 <span class="choic-num">0</span> 件
						|
						<a href="#">删除所选项</a>


						<a class="buy btn btn-danger fr ml10" onclick="buyAll()">
							下单
						</a>
						<span class="fr ">合计 : <i class="total">0</i> 元</span>
						<input type="text" hidden="hidden" name="total" id="total" value="0">
					</td>
				</tr>
			</table>
			</form>
		</div>


		<!-- =============== 最后的网站底部 =============== -->
		<div th:replace="~{common::footer}"></div>
	</body>
	
</html>
